<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>实例</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 400px;
            height: 300px;
            position: relative;
            top: 0;
            margin: 20px auto;
            background-color: black;
        }
        .box img{
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0;
        }
        .min{
            position: absolute;
            top: 0;
            width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.616);
            display: none;
        }
        .box:hover .min{
            display: block;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="素材/7.png" title="WDNMD!">
        <div class="min"></div>
    </div>
</body>
</html>